<template>
	<view>
		<view class="menu">
			<uni-segmented-control :current="current" :values="items1" @clickItem="onClickItem('current1',$event)"
				styleType="text" activeColor="#ea5a59"></uni-segmented-control>
		</view>
		<view class="box">
			<uni-segmented-control :current="current" :values="items" @clickItem="onClickItem('current',$event)"
				styleType="button" activeColor="#ea5a59"></uni-segmented-control>
			<view class="empty">
				<image
					src=""
					mode="widthFix" class="img"></image>
				<text>暂无记录</text>
			</view>
		</view>
		<navbar :active="1"></navbar>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				items: ['待完成', '已完成', '已失效'],
				current: 0,
				items1: ['华南农业大学', '华南农业大学', '华南农业大学'],
				current1: 0,
			}
		},
		methods: {
			onClickItem(name, e) {
				if (this[name] != e.currentIndex) {
					this[name] = e.currentIndex;
				}
			}
		}
	}
</script>

<style scoped lang="scss">
	.menu {
		background-color: #fff;
		padding: 20rpx 0;
	}

	.box {
		min-height: 100vh;
		background-color: #f6f6f6;
		padding: 20rpx;
	}

	.empty {
		display: flex;
		justify-content: center;
		align-items: center;
		flex-direction: column;
		padding-top: 200rpx;

		image {
			width: 40%;
			margin-bottom: 20rpx;
		}
	}
</style>